import { ADDPERSON } from '../action_types'
const initData = [{
  id: 1,
  name: '鸣人',
  age: 12
}]

export default function personReducers(preState = initData, { type, data }){
  switch(type){
    case ADDPERSON:
      return [data, ...preState]
    default:
      return preState
  }
}